Upgrade to mdbook 0.5.1 (breaking)#136
Conversation
|
Checking tests on CI. They didn't fail me. |
I will merge my prepared PR first with important fixes then you'd be better to merge changes to your PR pls. |
|
Pls, do not level up crates in dependencies higher then they are present in oficial mdbook project. |
There are failing tests that I don't understand
…0.5.1 Adjust everything to compile and use matching versions of dependencies.
I moved back a little those which had bigger version than There are still failing tests I don't know how to fix as they complain about error in duplicated paths, what may mean new version of |
Same failure I'm getting. But the path in the error seem to be one inside EPUB, not path on the disk. I have no idea why it's duplicated while wasn't previously. |
|
During generation the failure is propagated from ZIP writing as an attempt is made to process |
Yes, resources get into epub archive twice and the check is failed. I will pull your branch and see details. |
|
|
||
| let mut added_count = 0; | ||
| for (idx, item) in self.ctx.book.sections.iter().enumerate() { | ||
| for (idx, item) in self.ctx.book.iter().enumerate() { |
There was a problem hiding this comment.
self.ctx.book.iter() - now returns Items + SubItems as one long list.
So that code is ok.
There was a problem hiding this comment.
But code at the end of method
fn add_chapter(&mut self, ch: &Chapter, is_first: Option<bool>) -> Result<(), Error>
that block
// second pass to actually add the sub-chapters
for sub_item in &ch.sub_items {
if let BookItem::Chapter(ref sub_ch) = *sub_item {
trace!("add sub-item = {:?}", sub_ch.name);
self.add_chapter(sub_ch, None)?;
}
}
Should be removed because it causes duplicate Chapter is added to book.
blandger
left a comment
There was a problem hiding this comment.
Remove not needed code that causes test error.
|
|
||
| let mut added_count = 0; | ||
| for (idx, item) in self.ctx.book.sections.iter().enumerate() { | ||
| for (idx, item) in self.ctx.book.iter().enumerate() { |
There was a problem hiding this comment.
But code at the end of method
fn add_chapter(&mut self, ch: &Chapter, is_first: Option<bool>) -> Result<(), Error>
that block
// second pass to actually add the sub-chapters
for sub_item in &ch.sub_items {
if let BookItem::Chapter(ref sub_ch) = *sub_item {
trace!("add sub-item = {:?}", sub_ch.name);
self.add_chapter(sub_ch, None)?;
}
}
Should be removed because it causes duplicate Chapter is added to book.
|
Then tests: will need investigation and fixes too. |
Looks like all is ok with them. |
This PR:
mdbookv0.5.1This would render
mdbook-epubnot backward compatible withmdbookv0.4.xFixes: #134